<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<%@taglib prefix="s" uri="/struts-tags"%>
<%@ page import="com.onlineMIS.ORM.entity.headQ.barcodeGentor.*"%>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">

<title>禧乐仓连锁店管理信息系统</title>
<script>

</script>
</head>
<body>
	<script>
function saveSupplier(){
	if ( $('#updateSupplierForm').form('validate')){
	    var params=$("#updateSupplierForm").serialize();
    	$.post("headQSupplierMgmtJSONAction!createUpdateSupplier",params, updateSupplierBKProcess,"json");	
	}
}
function updateSupplierBKProcess(data){
	var returnCode = data.returnCode;
	if (returnCode != SUCCESS)
		alert(data.message);
	else {
		$.modalDialog.handler.dialog('close');
		$("#dataGrid").datagrid('reload');
	}		
}
function cancel(){
	$.modalDialog.handler.dialog('close');
}

</script>
	<s:form id="updateSupplierForm" name="updateSupplierForm" method="post"
		theme="simple" cssClass="easyui-form">
		<div class="errorAndmes">
			<s:actionerror cssStyle="color:red" />
			<s:actionmessage cssStyle="color:blue" />
		</div>
		<table width="90%" border="0" style="position:relative;top:20px;left:20px;">

			<tr class="InnerTableContent">
				<td align="center"><span style="color:red">*</span><strong>供应商名字 :</strong></td>
				<td><s:hidden name="formBean.supplier.id" /> <s:textfield
						id="name" name="formBean.supplier.name" style="width:220px;" cssClass="easyui-textbox"
						data-options="prompt:'请输入供应商名称',required:true,validType:'length[2,20]'" /></td>
			</tr>
			<tr class="InnerTableContent">
				<td align="center"><span style="color:red">*</span><strong>供应商地址 :</strong></td>
				<td><s:textfield id="address" name="formBean.supplier.address"
						cssClass="easyui-textbox" style="width:220px;"
						data-options="prompt:'请输入供应商地址',required:true,validType:'length[2,50]'" /></td>
			</tr>
			<tr class="InnerTableContent">
				<td align="center"><strong>电话号码 :</strong></td>
				<td><input id="phone" name="formBean.supplier.phone" style="width:220px;"
						class="easyui-textbox" data-options="prompt:'请输入供应商电话'"  value="<s:property value="formBean.supplier.phone"/>"
						 /></td>
			</tr>
			<tr class="InnerTableContent">
				<td align="center"><strong>备注信息 :</strong></td>
				<td><s:textfield id="comment" name="formBean.supplier.comment" style="width:220px;"
						cssClass="easyui-textbox" data-options="prompt:'请输入供应商备注信息',validType:'length[0,20]'" /></td>
			</tr>
			<tr class="InnerTableContent">
				<td align="center"><strong>状态 :</strong></td>
				<td><s:select name="formBean.supplier.status" id="status"
						cssClass="easyui-combobox" style="width:120px;"
						list="#{'0':'正常','1':'冻结'}" listKey="key" listValue="value" /></td>
			</tr>
			<tr class="InnerTableContent">
				<td></td>
				<td><a onclick="saveSupplier();"
					href="javascript:void(0);" data-options="iconCls:'icon-ok'" class="easyui-linkbutton">保存</a> <a
					onclick="cancel();" href="javascript:void(0);"  data-options="iconCls:'icon-redo'"
					class="easyui-linkbutton">退出</a></td>
			</tr>
		</table>
	</s:form>


</body>
</html>